/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package mp.weixin.WXpublic.material;

import java.util.Date;

/**
 * 除了图文之外的所有素材对象
 *
 * @author 王仲秋
 */
public class MaterialOther {

    private MaterialOther() {
        this.type = null;
    }

    public MaterialOther(MaterialType type) {
        this.type = type;
    }
    private String mediaId;
    private String name;
    private Date updateTime;
    private String url;
    private final MaterialType type;

    public String getMediaId() {
        return mediaId;
    }

    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * 这个对象只可能是 图片、语音、视频 中的一个
     *
     * @return
     */
    public MaterialType getType() {
        return type;
    }

    public enum MaterialType {
        IMAGE("image", "图片"),
        VIDEO("video", "视频"),
        VOICE("voice", "音频"),;
        private final String value;
        private final String desc;

        MaterialType(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
        

    }

}
